<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h2>剩余时间:</h2>
    <p class="count"></p>

    <!-- 倒计时 -->
    <script src="js/utils.js"></script>
    <script>
        function countDown() {
            var nowTime = new Date();  //现在的时间
            var endTime = new Date("2020/11/11,00:00:00");  //结束时间

            document.querySelector(".count").innerHTML = chaTime(nowTime, endTime);
        }
        setInterval(countDown, 1000);
    </script>
</body>

</html>